<template>
  <div class="lists-nav-container">
    <div class="gys-lists-nav">
      <section :class="curType==0?'cur':''"
               @click="clickListsNav(0)">全部订单<i></i></section>
      <section :class="curType==1?'cur':''"
               @click="clickListsNav(1)">待发货<i></i></section>

    </div>
  </div>
</template>

<script>
import Vue from 'vue'
export default Vue.extend({
  name: 'index',
  components: {

  },
  props: {
    curType: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
    }
  },
  methods: {
    clickListsNav(type) {
      if (type != this.curType) {
        this.$emit('changeOrderType', type)
      }
    }
  },
  created() {
  }
})
</script>

<style lang="scss">
@import "src/styles/mixin";
.gys-lists-nav {
  display: flex;
  background: #fff;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  section {
    position: relative;
    flex: auto;
    height: 80px;
    line-height: 60px;
    font-size: 26px;
    text-align: center;
    &.cur {
      font-size: 28px;
      font-weight: bold;
      i {
        position: absolute;
        left: 50%;
        margin-left: -27px;
        bottom: 24px;
        width: 54px;
        height: 5px;
        font-size: 0;
        overflow: hidden;
        @include gradient(right,RGBA(242, 18, 40, 1),RGBA(242, 18, 40, .1));
      }
    }
  }
}
</style>